import request from '@/utils/request'


/*
*  新增监控区域
*  */
export function addMonitorArea(data) {
  return request({
    url: '/monitorArea',
    method: 'post',
    data
  })
}
/*
*  获取监控区域树形列表
*  */
export  function getMonitorAreaTreeList(params) {
  return request({
    url: '/monitorArea/tree',
    method: 'get',
    params
  })
}
/*
*  重命名监控区域树形列表名称
*  */
export function updateMonitorAreaName(data) {
  return request({
    url: '/monitorArea/rename',
    method: 'put',
    data
  })
}
/*
*  删除监控区域
*  */
export function deleteMonitorArea(baseId) {
  return request({
    url: `/monitorArea?baseId=${baseId}`,
    method: 'delete'
  })
}
/*
*  移动监控区域
*  */
export function moveMonitorArea(data) {
  return request({
    url: '/monitorArea/move',
    method: 'put',
    data
  })
}
/*
*  新增监控摄像头
*  */
export function addCamera(data) {
  return request({
    url: '/monitorCamera',
    method: 'post',
    data
  })
}
/*
*  摄像头列表
*  */
export function monitorCameraList(params) {
  return request({
    url: '/monitorCamera/list',
    method: 'get',
    params
  })
}
/*
*  删除监控摄像头
*  */
export function deleteMonitorCamera(baseId) {
  return request({
    url: `/monitorCamera?baseId=${baseId}`,
    method: 'delete'
  })
}
/*
*  编辑监控摄像头
*  */
export function editMonitorCamera(data) {
  return request({
    url: '/monitorCamera',
    method: 'put',
    data
  })
}
/*
*  查询摄像头详情
*  */
export function monitorCameraDetails(baseId) {
  return request({
    url: `/monitorCamera/${baseId}`,
    method: 'get'
  })
}

